package com.itheima.web;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * Created by crowndint on 2018/10/1.
 */
@Controller
public class StartController {

    @Value("${person.name}")
    private String name;
    @Value("${person.age}")
    private Integer age;

    @RequestMapping("/hello")
    @ResponseBody
    public String hello() {

        System.out.printf("hello()");
        return "hello world: "+name+" "+age;
    }


}
